//
//  GoodsInfoTextTableViewCell.m
//  KingSelected
//
//  Created by 杨鹏 on 2023/11/1.
//

#import "GoodsInfoTextTableViewCell.h"

@interface GoodsInfoTextTableViewCell ()

@property (nonatomic, strong) UILabel *contentLabel;

@end

@implementation GoodsInfoTextTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        self.backgroundColor = [UIColor whiteColor];
        [self setupViews];
    }
    return self;
}

- (void)setupViews {
    [self.contentView addSubview:self.contentLabel];
    [self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.mas_equalTo(16);
        make.trailing.mas_equalTo(-16);
        make.top.mas_equalTo(10);
        make.bottom.mas_equalTo(-10);
    }];
}

- (void)setContentStr:(NSString *)contentStr {
    _contentStr = contentStr;
    self.contentLabel.text = contentStr;
}

- (UILabel *)contentLabel {
    if (!_contentLabel) {
        _contentLabel = [[UILabel alloc] init];
        _contentLabel.font = kFontRegula(13);
        _contentLabel.textColor = kRGB(0x666666);
        _contentLabel.numberOfLines = 0;
        _contentLabel.textAlignment = NSTextAlignmentLeft;
    }
    return _contentLabel;
}

@end
